Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subsurfaces for drag surfaces #205

Merged
merged 2 commits into from
Jan 3, 2025
Merged

Subsurfaces for drag surfaces #205

merged 2 commits into from
Jan 3, 2025

Conversation

ids1024
Copy link
Member

@ids1024 ids1024 commented Dec 17, 2024

Use Icon::Surface instead of Icon::Buffer, so we can then create subsurfaces of the wl_surface.

Using .screenshot() then copying to an shm buffer is suboptimal, but this does seem overall better than with the older Iced version when a drag surface didn't appear until a Vulkan surface could be created for it.

This seems to be working okay now, but there are a few things to fix. As well as a bug I'm seeing in cosmic-comp. cosmic-workspaces also wants the offset support for drag surfaces we previously had.

@ids1024
Copy link
Member Author

ids1024 commented Jan 2, 2025

This requires pop-os/window_clipboard#3.

Use `Icon::Surface` instead of `Icon::Buffer`, so we can then create
subsurfaces of the `wl_surface`.

Using `.screenshot()` then copying to an shm buffer is suboptimal, but
this does seem overall better than with the older Iced version when a
drag surface didn't appear until a Vulkan surface could be created for
it.

This re-uses `Connection` in the platform-specific code, instead of
creating from display handle on each call.
@ids1024 ids1024 changed the title WIP Subsurfaces for drag surfaces Subsurfaces for drag surfaces Jan 2, 2025
@ids1024 ids1024 marked this pull request as ready for review January 2, 2025 21:50
@ids1024 ids1024 requested a review from a team January 2, 2025 21:50
@ids1024 ids1024 merged commit bb0f0d5 into master Jan 3, 2025
4 of 32 checks passed
@ids1024 ids1024 deleted the subsurface branch January 3, 2025 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants